<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>任务列表demo</title>
    <style>
        .h1{
            color: red;
        }
    </style>
</head>
<body>
<div id="application">
    <div>点击次数：<span :class="h1">{{type}}</span></div>
    <div><button v-on:click="addCount">点击</button></div>
    <div>{{type}}</div>
</div>
<script src="../vue3.js"></script>
<script>
    const app = {
        data() {
            return {
                h1: "h1",
                count: 0
            }
        },
        methods: {
            addCount() {
                this.count += 1
            },
            typeFunc() {
                return this.count >= 3 ? "大" : this.count
            }
        },
        computed: {
            type() {
                return this.count >= 3 ? "大" : this.count
            }
        }
    }
    Vue.createApp(app).mount("#application")
</script>
</body>
</html>